package br.edu.ifrn.tads.rettiwt.beans;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class Login {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key oid;

	@Persistent
    private String username;
    
    @Persistent
    private String password;
	
	public Login(String apelido, String password){
		this.setUsername(apelido);
		this.setPassword(password);
	}
	
	public boolean isValid(){
		return true;
	}
	
	public boolean autenticar(){
		return true;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String apelido) {
		this.username = apelido;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
    public Key getIdLogin() {
		return oid;
	}

	public void setIdLogin(Key idLogin) {
		this.oid = idLogin;
	}

    
    
}
